Skip to content

Reorganize build: SwiftKit has "swift kit" core, and SwiftKitExample #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

ktoso
Copy link
Collaborator

@ktoso ktoso commented Oct 8, 2024

Further progress on cleaning up the build. We're still having issues with various runtime issues but this gets us to a more understandable separation of "what is a sample" and "what is the library". There's more to be done before we can kill off make but this does quite some progress.

  • Sample apps "anything with a main()" have their own place; it used to be very mixed up in the same target; together with the example lib
    • JavaKitSampleApp there's a sample for javakit which uses the JavaKitExample defined swift type
    • SwiftKitSampleApp the jextract demo app, uses the ExampleSwiftLibrary
    • those JavaKitExample and ExampleSwiftLibrary could use further moving out of Sources/... as they're example stuff, not "the library" but I leave at this for now...

Running samples: ./gradlew Samples:SwiftKitSampleApp:run (Samples:Name:run)

  • ./gradlew test does the jextract and whatever the sample apps need
  • make is still around; didn't hook up any of the javakit generation
  • generated sources no longer in wrong directory; src/generated/... as the usual convention in Java land (and not committed)

Screenshot 2024-10-08 at 13 54 30

Tests status:

  • macOS
    • gradle test -- OK
    • swift test -- OK
  • linux
    • gradle test -- OK
    • swift test -- OK

but there's some disabled tests on either platforms... We really should get nightly toolchains so we can kill off the nm things with #27 and I'm working to figure that out.

ktoso added 2 commits October 8, 2024 14:49
Further progress on cleaning up the build. We're still having issues
with various runtime issues but this gets us to a more understandable
separation of "what is a sample" and "what is the library". There's more
to be done before we can kill off `make` but this does quite some
progress.

- Sample apps "anything with a main()" have their own place; it used to
  be very mixed up in the same target; together with the example lib
    - `JavaKitSampleApp` there's a sample for javakit which uses the
      `JavaKitExample` defined swift type
    - `SwiftKitSampleApp` the jextract demo app, uses the
      `ExampleSwiftLibrary`
    - those JavaKitExample and ExampleSwiftLibrary could use further
      moving out of `Sources/...` as they're example stuff, not "the
library" but I leave at this for now...

Running samples: ./gradlew Samples:SwiftKitSampleApp:run
(Samples:Name:run)

- `./gradlew test` does the jextract and whatever the sample apps need
- make is still around; didn't hook up any of the javakit generation
- generated sources no longer in wrong directory; `src/generated/`... as
  the usual convention in Java land (and not committed)
@ktoso ktoso force-pushed the wip-build-cleanup branch from 98038f9 to 53b811a Compare October 8, 2024 05:52
@ktoso
Copy link
Collaborator Author

ktoso commented Oct 8, 2024

With disabled tests per platform challenges, but at least we have our first green CI run 🥳

@ktoso ktoso merged commit 94dbaff into swiftlang:main Oct 8, 2024
9 checks passed
@ktoso ktoso deleted the wip-build-cleanup branch October 8, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant